<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>

        <ui:composition template="/publico/template.xhtml">

            <ui:define 
                name="content">
                <h:form 
                    id="flote">
                    <p:panel 
                        header="Alterar o Transporte - Id #{transporteBean.transporte.id}?">
                        <h:inputHidden 
                            value="#{transporteBean.transporte.id}"/>
                        <h:panelGrid 
                            columns="3" 
                            cellpadding="10">
                            <h:outputLabel 
                                for="somlote" 
                                value="Numero do Lote: *"/>
                            <h:selectOneMenu 
                                id="somlote"
                                value="#{transporteBean.transporte.lote}">
                                <f:selectItems 
                                    value="#{transporteBean.selectLote}"/>
                                <f:converter 
                                    converterId="LoteConversor"/>
                            </h:selectOneMenu>
                            <a href="/Shif/faces/pesagem/lote.xhtml">Novo Lote</a>
                            <h:outputLabel 
                                id="olorigem"
                                for="somlocalorigem" 
                                value="Transporte de origem: *"/>
                            <h:selectOneMenu 
                                id="somlocalorigem" 
                                value="#{transporteBean.transporte.origem}">
                                <f:selectItems 
                                    value="#{transporteBean.selectLocal}"/>
                                <f:converter 
                                    converterId="LocalConversor"/>
                            </h:selectOneMenu>
                            <a href="/Shif/faces/localTransporte/mLocal.xhtml">Novo Local</a>
                            <h:outputLabel 
                                for="somlocaldestino" 
                                value="Transporte de destino: *"/>
                            <h:selectOneMenu 
                                id="somlocaldestino"
                                value="#{transporteBean.transporte.destino}">
                                <f:selectItems 
                                    value="#{transporteBean.selectLocal}"/>
                                <f:converter 
                                    converterId="LocalConversor"/>
                            </h:selectOneMenu>
                            <a href="/Shif/faces/localTransporte/mLocal.xhtml">Novo Local</a>
                            <h:outputLabel
                                for="cdatatransporte" 
                                value="Data do transporte: *"/>
                            <p:calendar
                                id="cdatatransporte"
                                value="#{transporteBean.transporte.dataTransporte}" 
                                pattern="dd/MM/yyyy"
                                required="true"/>
                            <p:commandButton 
                                id="cbalterar"
                                ajax="false" 
                                action="#{transporteBean.alterar}"
                                value="Alterar"/>
                            <p:commandButton 
                                id="cbcancelar" 
                                ajax="false" 
                                action="listar" 
                                value="Cancelar"/>    

                        </h:panelGrid>

                    </p:panel>
                </h:form>
            </ui:define>

        </ui:composition>

    </body>
</html>
